import random
import numpy as np
import torch
import os

class Config():
    def __init__(self):
        self.use_cuda = True # 使用GPU训练
        self.epoch = 200 # 训练的轮次
        self.batch_size = 2048 # 批次
        self.train = 0.8 # 划分训练集的百分比
        self.lr = 0.001 # {0.01 0.005 0.001}
        self.embedSize = 64 # 嵌入的维度
        self.gcn_layers = 2 # GCN层数


def seed_torch(seed=2021):
    random.seed(seed)
    os.environ['PYTHONHASHSEED'] = str(seed) 
    np.random.seed(seed)
    torch.manual_seed(seed)
    torch.cuda.manual_seed(seed)
    torch.cuda.manual_seed_all(seed) 
    torch.backends.cudnn.benchmark = False
    torch.backends.cudnn.deterministic = True